package org.jeecg.modules.door.job;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.door.entity.LwgyDoorGrouppassword;
import org.jeecg.modules.door.entity.LwgyDoorPassword;
import org.jeecg.modules.door.service.ILwgyDoorGrouppasswordService;
import org.jeecg.modules.door.service.ILwgyDoorPasswordService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * TODO
 *
 * @author sn
 * @date 2023-08-18 15:20
 *同步门锁密码定时器
 */
@Slf4j
public class SysnLockPasswordJob implements Job {

    @Autowired
    private ILwgyDoorPasswordService lwgyDoorPasswordService;





    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        //获取有效的未同步的密码信息
        QueryWrapper<LwgyDoorPassword> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("status",'1');
        queryWrapper.eq("sysn",'0');//1是同步0是不同步
        List<LwgyDoorPassword> list1 = lwgyDoorPasswordService.list(queryWrapper);

     //往第三方推送




    }
}
